<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        ul {
            list-style: none;
            padding: 0;
            display: flex;
        }

        li {
            position: relative;
            padding: 10px;
            cursor: pointer;
        }

        li::after {
            display: block;
            position: absolute;
            bottom: 50px;
            left: 0;
            content: '';
            width: 100%;
            height: 2px;
            background: #4286F5;
            opacity: 0;
            transition: .3s ease-in;
        }

        li.active::after {
            opacity: 1;
            bottom: 0;
        }

        li:hover::after {
            opacity: 1;
            bottom: 0;
        }
    </style>
</head>
<body>
<ul>
    <li class="active">选项一</li>
    <li>选项二</li>
    <li>选项三</li>
    <li>选项四</li>
</ul>
</body>
</html>
